package org.ft.fileConvert.enums;

/**
 * 是否
 */
public enum ConvertTypeEnum {

    WORD_TO_PDF(1, "word转pdf"),
    WORD_TO_OFD(2, "word转ofd"),
    PDF_TO_OFD(3, "pdf转ofd"),
    OFD_TO_PDF(4, "ofd转pdf");

    private Integer key;
    private String value;

    ConvertTypeEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    /**
     * 根据keu获取秘密级别值
     *
     * @param key
     * @return
     */
    public static String getValueByCode(Integer key) {
        for (ConvertTypeEnum value : ConvertTypeEnum.values()) {
            if (value.getKey().equals(key)) {
                return value.getValue();
            }
        }
        return null;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
